﻿using System;

namespace ServerYuGi
{
    public partial class SSupervisor
    {
        public void NegateCardBefore(int IDCardActive)
        {
            int IDCardActived = ChainMnager.NegateCardBeforeInChain(IDCardActive);
            if(IDCardActived > -1)
            {
                SPlayer player = GetPlayerOwner(IDCardActived);
                SendMessage_CARD_XOABAI_ToAll(IDCardActived);
                if (player.CheckIDCardTrenBan(IDCardActived))
                {
                    player.MoveFromTable2Graveyard(IDCardActived);
                    return;
                }
                if (player.CheckIDCardTrenTay(IDCardActived))
                {
                    player.MoveFromHand2Graveyard(IDCardActived);
                    return;
                }
                
            }
        }
    }
}